package com.picket.service;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Service;

import com.picket.dao.IMatchDao;
import com.picket.domain.Match;

@Service
public class MatchService implements  IMatchService{
	 
	 private IMatchDao matchDao;
	  
	 @Required
	 public void setMatchDao(
	      final IMatchDao matchDao) {
	    this.matchDao = matchDao;
	 }
	 
	 @Override
	 public void create(final List<Match> matches) {
		 matchDao.create(matches);
	 }
	 
	 @Override
	 public Collection<Match> getAllMatches() {
	  return matchDao.getAllMatches();
	 }

	 @Override
	 public Collection<Match> getAllMatchesForEvent(long id) {
	  return matchDao.getAllMatchesForEvent(id);
	 }
	 
	@Override
	public Match getMatch(long id) {
		return matchDao.getMatch(id);
	}
	 
	@Override
	public Match updateMatch(long id, String matchResult) {
		return matchDao.updateMatch(id, matchResult);
	}
}
